﻿@model AesApplication.Models.StaffingExpertQuestionCreatorModel


@using (Html.BeginForm()) {
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    
<fieldset>
    @Html.HiddenFor(model=>model.Question.ID)
    @Html.HiddenFor(model=>model.Question.Questionnaire.ID)
        <div class="editor-label">
            @Html.LabelFor(model => model.Question.Text)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Question.Text)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Question.Type)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.SelectedType, Model.QuestionTypes)
        </div>
        @if (Model.Question.Type == AesApplication.Models.QuestionType.MultipleChoice) 
        {       
            <label>Choices:</label>
             foreach(var MCOptions in Model.MultipleChoiceOptions)
            {

            <div class="editor-field">
              @Html.DisplayFor(modelitem=>MCOptions.Name)
              @Html.DisplayFor(modelitem => MCOptions.Text)         
            </div>
             }
     
        }
        <div class="editor-label">
             @Html.LabelFor(model => model.Question.ExpectedAnswer)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Question.ExpectedAnswer)
        </div>
        <div class="editor-field">
            
        </div>
        <p>
            <input type="submit" value="Save" />
        </p>
</fieldset>
}
<div>
    @Html.ActionLink("Back to Index", "Index")
</div>